package com.demo.aidroid.bean;


import com.demo.aidroid.R;


import java.io.Serializable;

/**
 * Created by kevinLiao on 2017/6/30.
 */
public class Book implements Serializable {

    private static final long serialVersionUID = 1L;

    private int img;
    @Deprecated
    private int imgRes;
    private String name;
    private String author;
    private String publishingHouse;
    private String publishTime;
    private String isbn;
    private String location;
    private String description;

    @Deprecated
    private boolean isSelected;

    public int getImgRes() {
        int id = 0;
        switch (img) {
            case 0:
                id = R.drawable.img_sgyy;
                break;
            case 1:
                id = R.drawable.img_gtszylcd;
                break;
            case 2:
                id = R.drawable.img_tmssdxw;
                break;
            case 3:
                id = R.drawable.img_xwz;
                break;
            case 4:
                id = R.drawable.img_tjkd;
                break;
            case 5:
                id = R.drawable.img_lbxplj;
                break;
            case 6:
                id = R.drawable.img_bngd;
                break;
            case 7:
                id = R.drawable.img_zfzdr;
                break;
            case 8:
                id = R.drawable.img_rlws;
                break;
            case 9:
                id = R.drawable.img_atsth;
                break;
        }
        return id;
    }

    public int getImg() {
        return img;
    }

    public void setImg(int img) {
        this.img = img;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublishingHouse() {
        return publishingHouse;
    }

    public void setPublishingHouse(String publishingHouse) {
        this.publishingHouse = publishingHouse;
    }

    public String getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(String publishTime) {
        this.publishTime = publishTime;
    }

    public String getIsbn() {
        return isbn;
    }

    public void setIsbn(String isbn) {
        this.isbn = isbn;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setImgRes(int imgRes) {
        this.imgRes = imgRes;
    }

    public boolean getIsSelected() {
        return this.isSelected;
    }

    public void setIsSelected(boolean isSelected) {
        this.isSelected = isSelected;
    }


}
